<!DOCTYPE html>
<html>
<head>
    <title>会员、主播</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <i-col span="4">
                <i-input v-model="q.name" @on-enter="query" placeholder="昵称"/>
            </i-col>
            <i-button @click="query">查询</i-button>
            #if($shiro.hasPermission("apiuser:save"))
            <i-button type="info" @click="add">新增</i-button>
            #end
            #if($shiro.hasPermission("apiuser:update"))
            <i-button type="warning" @click="update">编辑</i-button>
            #end
            #if($shiro.hasPermission("apiuser:delete"))
            <i-button type="error" @click="del">删除</i-button>
            #end
            #if($shiro.hasPermission("apiuser:suspend"))
            <i-button type="error" @click="suspend">封号</i-button>
            #end
            #if($shiro.hasPermission("apiuser:suspend"))
            <i-button type="info" @click="unsuspend">解封</i-button>
            #end
            #if($shiro.hasPermission("apiuser:update"))
            <i-button type="success" @click="comment">评论管理</i-button>
            #end
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="apiUser" :rules="ruleValidate" :label-width="100">

            <Row>
                <i-col span="12">
                    <Row>
                        <i-col span="16">
                            <Form-item label="主播头像" prop="avatar">
                                <img width="100px" height="100px" :src="avatar" v-show="showAvatar"/>
                            </Form-item>
                        </i-col>

                        <i-col span="6">
                            <Form-item :label-width="1">
                                <Upload style="width: 300px;" action="../api/auth/upload" :format="['jpg','jpeg','png']"
                                        max-size="2048"
                                        :on-success="handleSuccessAvatar" :on-format-error="handleFormatError"
                                        :show-upload-list="false"
                                        :on-exceeded-size="handleMaxSize">
                                    <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                                </Upload>
                            </Form-item>
                        </i-col>
                    </Row>
                    <Form-item label="海报（750*750）">
                        <template>
                            <div class="upload-list" v-for="item in uploadList">

                                <img :src="'https://www.qutuiya.com/'+item.url" width="180px" height="100px"/>
                                <div class="upload-list-cover">
                                    <Icon type="ios-eye-outline" @click.native="handleView(item.url)"></Icon>
                                    <Icon type="ios-trash-outline" @click.native="handleRemove(item)"></Icon>
                                </div>

                            </div>
                            <Upload
                                    ref="upload"
                                    :show-upload-list="false"
                                    :default-file-list="uploadList"
                                    :on-success="handleSuccess"
                                    :format="['jpg','jpeg','png']"
                                    :max-size="2048"
                                    :on-format-error="handleFormatError"
                                    :on-exceeded-size="handleMaxSize"
                                    :before-upload="handleBeforeUpload"
                                    multiple
                                    type="drag"
                                    action="../api/auth/upload"
                                    style="display: inline-block;width:58px;">
                                <div style="width: 58px;height:58px;line-height: 58px;">
                                    <Icon type="camera" size="20"></Icon>
                                </div>
                            </Upload>
                            <Modal title="查看图片" v-model="visible">
                                <img :src="'https://www.qutuiya.com/'+imgName" v-if="visible" style="width: 100%"/>
                            </Modal>
                        </template>
                    </Form-item>

                    <Form-item label="昵称" prop="nickname">
                        <i-input v-model="apiUser.nickname" placeholder="昵称"/>
                    </Form-item>
                    <Form-item label="手机" prop="phone">
                        <i-input v-model="phone" placeholder="手机"/>
                    </Form-item>
                    <Form-item label="可用金额" prop="availableAmount">
                        <i-input v-model="apiUser.availableAmount" placeholder="可提现金额"/>
                    </Form-item>
                    <Form-item label="可提现金额" prop="presentAmount">
                        <i-input v-model="apiUser.presentAmount" placeholder="可提现金额"/>
                    </Form-item>
                    <Form-item label="累计收益金额" prop="withdrawAmount">
                        <i-input v-model="apiUser.withdrawAmount" placeholder="累计收益金额"/>
                    </Form-item>

                    <Form-item label="出生日期" prop="birthday">
                        <Date-picker v-model="apiUser.birthday" placeholder="出生日期"></Date-picker>
                    </Form-item>
                    <Form-item label="注册时间" prop="registerTime">
                        <Date-picker v-model="apiUser.registerTime" placeholder="注册时间"></Date-picker>
                    </Form-item>
                    <Form-item label="近次登录" prop="lastLoginTime">
                        <Date-picker v-model="apiUser.lastLoginTime" placeholder="最后一次登录时间"></Date-picker>
                    </Form-item>
                    <Form-item label="亲密值" prop="intimacy">
                        <i-input v-model="apiUser.intimacy" placeholder="亲密值"/>
                    </Form-item>
                    <Form-item label="权重排序" prop="sort">
                        <i-select v-model="apiUser.sort" style="width:200px">
                            <i-option :value="1" :key="1">1</i-option>
                            <i-option :value="2" :key="2">2</i-option>
                            <i-option :value="3" :key="3">3</i-option>
                            <i-option :value="4" :key="4">4</i-option>
                            <i-option :value="5" :key="5">5</i-option>
                            <i-option :value="6" :key="6">6</i-option>
                            <i-option :value="7" :key="7">7</i-option>
                            <i-option :value="8" :key="8">8</i-option>
                            <i-option :value="9" :key="9">9</i-option>
                            <i-option :value="10" :key="10">10</i-option>
                        </i-select>
                        <!--<i-input v-model="apiUser.sort" placeholder="权重排序 10-1"/>-->
                    </Form-item>

                </i-col>
                <i-col span="12">

                    <Form-item label="城市" prop="cityName">
                        <i-input v-model="apiUser.cityName" placeholder="所在城市名称"/>
                    </Form-item>
                    <Form-item label="年龄" prop="age">
                        <i-input v-model="apiUser.age" placeholder="年龄"/>
                    </Form-item>
                    <Form-item label="性别" prop="gender">
                        <Radio-group v-model="apiUser.gender">
                            <Radio label="1">
                                <span>男</span>
                            </Radio>
                            <Radio label="2">
                                <span>女</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="星座" prop="constellation">
                        <i-input v-model="apiUser.constellation" placeholder="星座"/>
                    </Form-item>
                    <Form-item label="身高（cm）" prop="height">
                        <i-input v-model="apiUser.height" placeholder="身高（cm）"/>
                    </Form-item>
                    <Form-item label="体重（kg）" prop="weight">
                        <i-input v-model="apiUser.weight" placeholder="体重（kg）"/>
                    </Form-item>
                    <Form-item label="个人介绍" prop="introduction">
                        <i-input type="textarea" v-model="apiUser.introduction" placeholder="个人介绍"/>
                    </Form-item>
                    <Form-item label="状态" prop="status">
                        <Radio-group v-model="apiUser.status">
                            <Radio label="1">
                                <span>有效</span>
                            </Radio>
                            <Radio label="2">
                                <span>禁用</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="类型" prop="type">
                        <Radio-group v-model="apiUser.type">
                            <Radio label="1">
                                <span>精选</span>
                            </Radio>
                            <Radio label="2">
                                <span>新人</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="申请状态" prop="applicationStatus">
                        <Radio-group v-model="apiUser.applicationStatus">
                            <Radio label="1">
                                <span>未提交</span>
                            </Radio>
                            <Radio label="2">
                                <span>待审核</span>
                            </Radio>
                            <Radio label="3">
                                <span>审核通过</span>
                            </Radio>
                            <Radio label="4">
                                <span>审核失败</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="在线状态" prop="onlineStatus">
                        <Radio-group v-model="apiUser.onlineStatus">
                            <Radio label="1">
                                <span>在线</span>
                            </Radio>
                            <Radio label="2">
                                <span>在聊 </span>
                            </Radio>
                            <Radio label="3">
                                <span>勿扰</span>
                            </Radio>
                            <Radio label="4">
                                <span>离线</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>


                </i-col>
            </Row>

            <Row>
                <i-col span="12">
                    <Form-item label="一对一视频" prop="live">
                        <Radio-group v-model="apiUser.live">
                            <Radio label="1">
                                <span>开通</span>
                            </Radio>
                            <Radio label="2">
                                <span>未开通</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <!--<Form-item label="叫醒" prop="wake">-->
                        <!--<Radio-group v-model="apiUser.wake">-->
                            <!--<Radio label="1">-->
                                <!--<span>开通</span>-->
                            <!--</Radio>-->
                            <!--<Radio label="2">-->
                                <!--<span>未开通</span>-->
                            <!--</Radio>-->
                        <!--</Radio-group>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="情感" prop="emotion">-->
                        <!--<Radio-group v-model="apiUser.emotion">-->
                            <!--<Radio label="1">-->
                                <!--<span>开通</span>-->
                            <!--</Radio>-->
                            <!--<Radio label="2">-->
                                <!--<span>未开通</span>-->
                            <!--</Radio>-->
                        <!--</Radio-group>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="向导" prop="guide">-->
                        <!--<Radio-group v-model="apiUser.guide">-->
                            <!--<Radio label="1">-->
                                <!--<span>开通</span>-->
                            <!--</Radio>-->
                            <!--<Radio label="2">-->
                                <!--<span>未开通</span>-->
                            <!--</Radio>-->
                        <!--</Radio-group>-->
                    <!--</Form-item>-->
                </i-col>
                <i-col span="12">
                    <Form-item label="一对一视频单价" prop="livePrice">
                        <i-input v-model="apiUser.livePrice" placeholder="一对一直播单价"/>
                    </Form-item>
                    <!--<Form-item label="叫醒单价" prop="wakePrice">-->
                        <!--<i-input v-model="apiUser.wakePrice" placeholder="叫醒单价"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="情感交流单价" prop="emotionPrice">-->
                        <!--<i-input v-model="apiUser.emotionPrice" placeholder="情感交流单价"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="向导单价" prop="guidePrice">-->
                        <!--<i-input v-model="apiUser.guidePrice" placeholder="向导单价"/>-->
                    <!--</Form-item>-->
                </i-col>

                <i-col span="24">
                    <Form-item label="经纪人" prop="agent">
                        <i-Select v-model="apiUser.agent" placeholder="">
                            <i-Option v-for="item in agentList" :value="item.userId" :key="item.userId">{{ item.username }}
                            </i-Option>
                        </i-Select>
                        <!--<i-input v-model="apiUserVideo.userId" placeholder="发布会员id"/>-->
                    </Form-item>
                </i-col>
            </Row>


            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <!--<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>-->
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/sysapi/zbuser.js?_${date.systemTime}"></script>
</body>
</html>